Object Lights

Lighting up your virtual world.

Adding lights to stationary and mobile objects

Directional, point or spot light sources can be attached to a specified point on any object.

To add a light source

  1. In the Sheets control bar, active 3D window sub-folder, the Object Type folder, right-click the object name, select Properties.

  2. In the Lights pane, double-click <Add new light> to display the Light Properties dialog.

  3. In the Type box, choose the type of light source required:
     

    Choose this...

    ...to do this

    Directional

    A Directional light source will illuminate all object surfaces equally and is not affected by the position of the object the light source is attached to. The direction of the light is specified relative to the object axes, and hence, is affected by the orientation of the object in the world.

    Point

    To create the effect of a light bulb which illuminates in all directions.

    A Point light source provides general localized lighting - the light intensity reduces as you move away from the light.

    Spot

    To create the effect of a searchlight, spotlight, headlight or a torch.

    A Spot light provides directional, localized lighting.

  4. Double-click the Color box to change the color of the light.

  5. For Point and Spot light types, define the Attenuation of the light source between 0 and 1. The suggested range of Attenuation values is:

    0.1 = weak - torch
    0.01 = bright - headlight
    0.001 = intense - searchlight

  6. For Spot light types only: define the Umbra value in degrees. The light is at full intensity inside the umbra, and reduces to zero intensity at the penumbra:


     

  7. For Point and Spot light types: define the Position of the light source in X, Y, Z object coordinates. The light may be placed inside (buildings) or at any position on or outside the object. For example, you can add a spotlight (spot) in mid-air 20m (Z=20) above a building object to illuminate the exterior, or a light bulb (point) 3m above the floor (Z=3), just below the ceiling, to illuminate the interior.

    The positioning of the light source is defined in the object coordinate system, with the origin at the center of the base of the object:

    • The distance units are in meters.

    • The coordinate (X, Y, Z) = (0, 0, 0) is at the center of the base or floor.

    • A positive X coordinate positions the light source towards the right of the object (when facing forward).

    • A positive Y coordinate positions the light source towards the front of the object.

    • A positive Z coordinate of 1.7 positions the light source 1.7m above the base (eye level).

  1. For Directional and Spot light types: define the Orientation of the light source by the Yaw (rotation about the Z or vertical axis), Pitch (rotation about the X or transverse axis) and Roll (rotation about the Y or central axis) angles relative to the object axes:


     

    Yaw

    Pitch

    Roll

    Direction

    0

    90

    0

    Points vertically down

    180

    0

    0

    Points horizontally backwards

    90

    0

    0

    Points horizontally sideways

    0

    30

    0

    Points 30 degrees down to the front

    45

    -45

    45

    Points diagonally up to the top right

Troubleshooting

The lighting effect of light sources attached to objects is influenced by:

  • Ambient and Directional atmospheric lighting

  • Other object lights

  • The orientation of the light

  • The position of the light in the object

  • The position and orientation of the object in the world

  • The orientation, texture and color of surfaces being illuminated

If you are having trouble getting the right effect, try this exercise:

  1. Turn off or reduce the Ambient and Directional lighting in the Environment Settings dialog

  2. Place the object initially in a position where there are no other object light sources (so you can be sure there is no contribution from another light).

  3. Use a simple set of light source settings for which the light source effect is understandable, for example: place a spot light at eye-level (X=0 Y=0 Z=1.7) with a horizontal, forward direction (Yaw=0 Pitch=0 Roll=0), with an Umbra of 30, Penumbra of 60, Attenuation of 0.001 (bright) and a Range of 100.

  4. Place a 'cube' object 10 meters directly in front of the object (to remove the influence of surface texture, color and orientation).

The cube should be clearly illuminated.

If the cube is not illuminated, the object axes are probably oriented differently to expected.

  1. Move the cube around the light source until you locate the brightest position for the cube - this is the direction of the central axis (see diagram above).

  2. Rotate and re-position the cube using the  buttons to see how the lighting effect changes as you rotate or move the cube away from or laterally to the object light. This will give you a clear demonstration of the effect of the Umbra, Penumbra, Attenuation and Range settings. Change these settings and move the cube again.

  3. Now position the cube where you wish to direct the light, and adjust the light settings accordingly. If the cube is not illuminated, check the Yaw, Pitch and Roll settings.

  4. Now change the position of the light source (X, Y and Z) and use the cube to confirm the direction and sense of each axis.

  openbook.gif (910 bytes)   Related Topics

 

Environmental lighting
Additional light sources

Adding objects
Placing objects